
// 设置公用返回事件
function back() {
    // #ifdef H5
        history.back()
    // #endif
    // #ifdef APP-PLUS
        uni.navigateBack({
            delta: 1,
			animationType: 'none',
			animationDuration: 10
        });
    // #endif
}

// 设置公用跳转事件
function navto(path){
    uni.navigateTo({
         url: path,
		 animationType: 'none',
		 animationDuration: 10
    });
}
// 复制文本
function copy(text){
    text = String(text)
    uni.setClipboardData({
        data: text,
        success: function(res) {
            uni.showToast({
                title: '复制成功',
                icon: 'none'
            });
        },
    });
}

function reLaunch(path){
    uni.reLaunch({
        url: path,
		animationType: 'none',
		animationDuration: 10
    });
}





// 设置公用跳转事件
function switchTab(path){
    uni.switchTab({
         url: path
    });
}

module.exports = {
	back,
    navto,
    copy,
    switchTab,
    reLaunch,
}
